package com.qiniu.pili.droid.rtcstreaming.demo.main;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.qiniu.pili.droid.rtcstreaming.demo.R;

public class HomeActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);
        initView();
    }

    private void initView() {
        Button btnAnchor = (Button) findViewById(R.id.anchor_activity);
        Button btnDience = (Button) findViewById(R.id.audience_activity);
        btnAnchor.setOnClickListener(this);
        btnDience.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.anchor_activity:
                startActivity(new Intent(HomeActivity.this,AnchorActivity.class));
                break;
            case R.id.audience_activity:
                startActivity(new Intent(HomeActivity.this,AudienceActivity.class));
                break;
        }
    }
}
